home *** CD-ROM | disk | FTP | other *** search
- on GETCODE
- global REGNAME, ALPH, ALP, LALP, SS, SN, REGNAME1
- set REGNAME to EMPTY
- set ALP to the key
- set ALPH to "ABCDEFGHIJKLMNOPQURSTUVWXYZabcdefghijklmnopqurstuvwxyz" & RETURN
- if charToNum(ALP) = 8 then
- set the text of field "REGNAMETEXT" to " "
- dontPassEvent()
- updateStage()
- exit
- end if
- if ((ALPH contains ALP) = 0) and (the key <> " ") and (the key <> RETURN) then
- dontPassEvent()
- end if
- if ((ALPH contains ALP) = 0) and (the key <> " ") and (the key <> RETURN) then
- exit
- end if
- if the key = RETURN then
- dontPassEvent()
- set LSLP to 0
- set REGNAME to the text of field "REGNAMETEXT"
- set LSLP to length(REGNAME)
- if LSLP < 5 then
- beep()
- end if
- if LSLP < 5 then
- put " " into field "REGNAMETEXT"
- end if
- updateStage()
- if LSLP < 5 then
- exit
- end if
- set REGNAME to the text of field "REGNAMETEXT"
- set the keyDownScript to "GETCODE1"
- set REGNAME1 to EMPTY
- repeat with N = 1 to length(REGNAME)
- set SS to char N of REGNAME
- set SN to charToNum(SS)
- set SN to SN + 48
- set SS to numToChar(SN)
- set REGNAME1 to REGNAME1 & SS
- end repeat
- go("CODE1")
- end if
- end
-